import request from '@/assets/utils/request'
import type {AxiosPromise} from 'axios'

/**
 * 获取分类树
 * @returns {AxiosPromise}
 */
export const getCategory = () => request.get('home/category/head')

/**
 * 获取品牌列表
 * @param limit 获取的数量
 * @return {AxiosPromise}
 */
export const getBrand = (limit: number) => request.get('home/brand', {limit})

/**
 * 获取轮播图数据
 * @return {AxiosPromise}
 */
export const getSwiper = () => request.get('home/banner')